//
//  FFMPEGClinet_Audio.h
//  IPCamera
//
//  Created by 宣佚 on 15/6/16.
//  Copyright (c) 2015年 Andon Health Co,.Ltd. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Andon_TUTK.h"
#import <AudioToolbox/AudioToolbox.h>
#import "globalConfiguration.h"

@interface FFMPEGClinet_Audio : NSObject
{
    AudioStreamBasicDescription audioDescription;
    AudioQueueBufferRef audioQueueBuffers[QUEUE_BUFFER_SIZE];
    
    MyData myData;
}
@property AudioQueueRef audioQueue;
@property NSLock *synlock;

-(MyData)getMyData;
-(MyData *)getMyDataRef;
+ (FFMPEGClinet_Audio *)sharedInstance;
- (BOOL)initFFmpegAudioStreamWithFormat:(ENUM_AUDIO_FORMAT)fmt ViewController:(id)ctl;
-(void)ReadPCMAndPlay:(char *)buf BufSize:(int)size BufIndex:(int)index;
-(void)readPCMAndPlay:(AudioQueueRef)outQ buffer:(AudioQueueBufferRef)outQB WithDataBuf:(char*)buf AndSize:(int)size;
@end
